﻿//  Copyright (c) 2011 Ray Liang (http://www.dotnetage.com)
//  Licensed MIT: http://www.opensource.org/licenses/mit-license.php

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DNA.Mvc.Management
{
    public interface IWebStatRepository:IRepository<WebRequestEntry>
    {
        IEnumerable<StatEntry> GetIncomingLinks(string website,int maxResult);

        IEnumerable<StatEntry> GetBrowsers(string website);

        IEnumerable<StatEntry> GetBrowsers(string website, DateTime start, DateTime end);

        IEnumerable<StatEntry> GetCrawlers(string website);

        IEnumerable<StatEntry> GetCrawlers(string website, DateTime start, DateTime end);

        IEnumerable<StatEntry> GetVisitors(string website, DateParts datePart = DateParts.Day);

        IEnumerable<StatEntry> GetVisitors(string website, DateTime start, DateTime end, DateParts datePart = DateParts.Day);

        IEnumerable<StatEntry> GetPageViews(string website, DateParts datePart = DateParts.Day);

        IEnumerable<StatEntry> GetPageViews(string website, DateTime start, DateTime end, DateParts datePart = DateParts.Day);

        WebStatistics GetStatistics(string website, int interval);

        void Clear();
    }
}
